package cn.wangzg.course1201;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

public class MatrixActivity extends AppCompatActivity {
    private MatrixView matrixView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_matrix);

        matrixView = findViewById(R.id.matrixView);
    }

    public void btnReset(View view) {
        switch (view.getId()) {
            case R.id.btn_reset:
                matrixView.setMethod(0);
                break;
            case R.id.btn_left:
                matrixView.setMethod(1);
                break;
            case R.id.btn_right:
                matrixView.setMethod(2);
                break;
            case R.id.btn_zoomin:
                matrixView.setMethod(3);
                break;
            case R.id.btn_zoomout:
                matrixView.setMethod(4);
                break;
            case R.id.btn_fanzhuan:
                matrixView.setMethod(6);
                break;
            case R.id.btn_rotate:
                matrixView.setMethod(7);
                break;
        }

    }
}
